From b439ecb76ceba1cb4232ca546c16bbee3fe05153 Mon Sep 17 00:00:00 2001 From: Platonides Date: Wed, 29 Jun 2011 17:20:47 +0000 Subject: [PATCH] Make a sidebar key with value false mean 'skip this header'. Intended for the forced headers, such as SEARCH. These entries would be added using SkinBuildSidebar hook. --- skins/MonoBook.php | 3 +++ skins/Vector.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 61e086d344..3e97af1249 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -180,6 +180,9 @@ echo $footerEnd; if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true; foreach ($sidebar as $boxName => $cont) { + if ( $cont === false ) + continue; + if ( $boxName == 'SEARCH' ) { $this->searchBox(); } elseif ( $boxName == 'TOOLBOX' ) { diff --git a/skins/Vector.php b/skins/Vector.php index c90c49a6c3..167a3ecfcd 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -274,6 +274,9 @@ class VectorTemplate extends BaseTemplate { } // Render portals foreach ( $portals as $name => $content ) { + if ( $cont === false ) + continue; + echo "\n\n"; switch( $name ) { case 'SEARCH': -- 2.20.1